package com.erp.helloworld.dao.idl;

import java.util.BitSet;
import java.util.Map;
import java.util.Set;

import com.paipai.lang.uint16_t;
import com.paipai.lang.uint32_t;
import com.paipai.lang.uint8_t;
import com.paipai.util.annotation.ApiProtocol;
import com.paipai.util.annotation.Field;
import com.paipai.util.annotation.HeadApiProtocol;
import com.paipai.util.annotation.Member;

@HeadApiProtocol(cPlusNamespace = "erp::helloworld::dao", needInit = true,needReset=true)
public class HelloWorldDao {
	@Member(cPlusNamespace=  "erp::helloworld::ddo",desc = "HelloWorld do", isNeedUFlag = true)
	public
    class HelloWorldDdo 
    {
		@Field(desc =   " 版本号   ", defaultValue=  "0")
        uint32_t  version;
		uint8_t version_u;

        @Field(desc =   " HelloWorld ID ")
        uint32_t helloWorldID;
        uint8_t helloWorlD_u;
        
        @Field(desc =   " HelloWorld 名称 ")
        String helloWorldName;
        uint8_t helloWorldName_u;
   
        @Field(desc =   " 添加时间")
        uint32_t createTime;
        uint8_t createTime_u;
        
        @Field(desc =   " 修改时间")
        uint32_t lastUpdateTime;
        uint8_t lastUpdateTime_u;
    }
	
	@Member(cPlusNamespace=  "erp::helloworld::ddo",desc = "过滤do", isNeedUFlag = true)
	public
    class HelloWorldFilterDdo 
    {
		@Field(desc =   " 版本号   ", defaultValue=  "0")
        uint32_t  version;
		uint8_t version_u;

        @Field(desc =   " 页码，从0开始 ")
        uint32_t page;
        uint8_t page_u;
        
        @Field(desc =   " 页面大小 ")
        uint32_t pageSize;
        uint8_t pageSize_u;
        
        @Field(desc =   " 排序方式 ")
        uint16_t orderType;
        uint8_t orderType_u;
        
        @Field(desc = "Id列表，若填写则其他过滤条件无效")
		Set<uint32_t> idList;
		uint8_t idList_u;
		
		@Field(desc =   " HelloWorld 名称 ")
        String helloWorldName;
		uint8_t helloWorldName_u;
        
        
        @Field(desc =   " 添加时间，上限")
        uint32_t createTimeBegin;
        uint8_t createTimeBegin_u;
        
        @Field(desc =   " 添加时间，下限")
        uint32_t createTimeEnd;
        uint8_t createTimeEnd_u;
        
        @Field(desc =   " 扩展")
        Map<String,String> extern;
        uint8_t extern_u;
    }
	
	
	@ApiProtocol(cmdid = "0xc0380001L", desc = " 根据ID获取 HelloWorld 信息 ")
	class GetHelloWorldById
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "过滤器，必填 ")
			HelloWorldFilterDdo helloWorldFilter;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "HelloWorld 信息 ")
			Map<uint32_t,HelloWorldDdo> helloWorlds;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
	
	
	@ApiProtocol(cmdid = "0xc0380002L", desc = " 写入HelloWorld信息 ")
	class AddHelloWorld
	{
		class Req 
		{
			@Field(desc = "机器码，必填 ")
	        String machineKey;

	        @Field(desc = "调用来源，必填 ")
	        String source;

	        @Field(desc = "场景id，必填 ")
	        uint32_t sceneId;					
			
			@Field(desc = "HelloWorld 信息，必填 ")
			HelloWorldDdo helloWorld;

			@Field(desc = "请求保留字 ")
			String inReserve;
		}
		class Resp 
		{
			@Field(desc = "错误信息 ")
			String errmsg;
			
			@Field(desc = "HelloWorld 信息，必填 ")
			HelloWorldDdo helloWorldBack;
			
			@Field(desc = "返回保留字  ")
			String outReserve;
		}
	};
}
